﻿
using Shinva.Common;
using Shinva.PLCModel.Models;
using Shinva.Variables.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Shinva.PLCModel.Service
{

    public class PlcModelService : IPlcModelService
    {
        /// <summary>
        /// OB程序块列表，可以自定义一些，有系统默认的序号不能占用和修改
        /// </summary>
        public List<PlcOB> OBList { get; set; } = new List<PlcOB>();

        /// <summary>
        /// FB程序块列表
        /// </summary>
        public List<PlcFB> FBList { get; set; } = new List<PlcFB>();

        /// <summary>
        /// FC程序块列表
        /// </summary>
        public List<PlcFC> FCList { get; set; } = new List<PlcFC>();

        /// <summary>
        /// DB数据块列表，在实际通讯中是实例区域 
        /// </summary>
        public List<PlcDB> DBList { get; set; } = new List<PlcDB>();

        /// <summary>
        /// 用户自定义的数据类型列表
        /// </summary>
        public List<PlcDataType> PlcDataType { get; set; } = new List<PlcDataType>();

        /// <summary>
        /// 用户默认变量表
        /// </summary>
        public List<PlcVariable> PlcVariable { get; set; } = new List<PlcVariable>();


        public IPlcMember GetPlcMember(List<string> symbol)
        {
            ///todo: 获取到变量的值
            ///
            return default;
        }
    }
}
